package com.qf.jedis.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * Caused by: java.io.NotSerializableException: com.qf.jedis.entity.User
 * 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
 * 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
 * 	at org.springframework.util.SerializationUtils.serialize(SerializationUtils.java:45)
 * 	... 23 more
 *
 * 	注意: 如果要使用spring的工具类序列化该类的对象为字节数组，需要把当前类实现 Serializable 接口
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    private Integer id;

    private String name;

    private Date birthday;
}
